import { Loading } from 'vant';
import http from '../request'

// 热门歌曲
export const playlistHot = async () => await http.get('/playlist/hot');

// 每日推荐
export const resourceDay = async () => await http.get('/recommend/resource');

// 歌单详情  
export const playlistDetail = (data) => http.get('/playlist/detail', {
  params: data,
  custom: { loading: true, loadingMsg: '正在加载...' }
});

// 歌单所有歌曲
export const getMuiscList = (data) => http.get('/playlist/track/all', { params: data });

// 获取音乐 url
export const getSongUrl = (data) => http.get('/song/url', {
  params: data,
  custom: { loading: true }
});

// 获取歌曲详情
export const getSongDetail = (data) => http.get('/song/detail', {
  params: data,
  custom: { loading: true }
});

// 获取推荐每日歌曲
export const getDaySongs = () => http.get('/recommend/songs');

// 推荐新音乐
export const getNewSong = (data) => http.get('/personalized/newsong', { params: data });

// 推荐新音乐
export const getLyric = (data) => http.get('/lyric', { params: data });

// 新歌速递
export const getTopSong = (data) => http.get('/top/song', { params: data });

// 歌曲评论
export const getMusicComment = (data) => http.get('/comment/music', { params: data });

// 歌曲评论
export const getSearchDefault = (data) => http.get('/search/default');

// 搜索建议
export const getSearchSuggest = (data) => http.get('/search/suggest', { params: data });

// 多重搜索结果
export const getSearchMultimatch = (data) => http.get('/search/multimatch', { params: data });

// 云搜索
export const getSearchMusic = (data) => http.get('/cloudsearch', { params: data });

// 热搜列表(简略)
export const getSearchHot = (data) => http.get('/search/hot');

// 热搜列表(详细)
export const getSearchHotDetail = (data) => http.get('/search/hot/detail');
